cmake_minimum_required(VERSION 3.0)

include_directories ("${PROJECT_SOURCE_DIR}/include/dumpParser")
file(GLOB SOURCES "*.cpp")

add_subdirectory(dumpParser)

set(ENV{PKG_CONFIG_PATH} /usr/lib/x86_64-linux-gnu/pkgconfig)
find_package(PkgConfig REQUIRED)
pkg_check_modules(CGRAPH REQUIRED IMPORTED_TARGET libcgraph)
if(${CGRAPH_FOUND})
    MESSAGE(${CGRAPH_LIBRARIES})
    MESSAGE(${CGRAPH_LINK_LIBRARIES})
else()
    MESSAGE(FATAL_ERROR "cgraph library not found")
endif()

add_executable(funcGraph ${SOURCES})
target_link_libraries (funcGraph dumpParser)

